package top.ochiamalu.aioj.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * OAuth
 *
 * @author ochiamalu
 * @date 2025/03/12
 */
@TableName(value ="oauth")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OAuth {
    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 0-github
     */
    private Integer loginType;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 第三方id
     */
    private Long openId;

    /**
     * 第三方用户名
     */
    private String username;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableLogic
    private Integer isDelete;
}